﻿using System;
using System.Collections.Generic; 
using System.Text;
using Runda.EShop.Common.Utility;
using System.Data.Common;

namespace Runda.EShop.Dal
{
    public partial class BizOrderComplaintReplyDal
    {
        public void UpdateComplaintStatus(Guid ID, EnumHelper.OrderComplaintStatus Status)
        {
            string sql = "UPDATE Biz_Order_Complaint SET [Status]=@Status WHERE ComplainID=@ComplainID";

            DbCommand dbcommand = CurrentDatabase.GetSqlStringCommand(sql);
            CurrentDatabase.AddInParameter(dbcommand, "@Status", System.Data.DbType.String, EnumDescAttribute.GetFieldText(Status));
            CurrentDatabase.AddInParameter(dbcommand, "@ComplainID", System.Data.DbType.Guid, ID);

            CurrentDatabase.ExecuteNonQuery(dbcommand);
        }
    }
}
